package com.rk.kbk.dao;

import com.rk.kbk.model.AdminAuthority;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * Created by bilibili on 2017/3/31.
 */
public interface AdminAuthorityDao extends JpaRepository<AdminAuthority, Long>,JpaSpecificationExecutor {
    /**
     * 根据管理者id获取权利目录列表
     */

    List<AdminAuthority> findByAdminId(Long adminId);

    /**
     * 根据管理者id获取权利目录列表h和状态
     */
    List<AdminAuthority> findByAdminIdAndStatus(Long adminId,Integer status);
}
